/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * NuevaDignidad.java
 *
 * Created on 14-ene-2013, 8:15:44
 */
package sisvoto.vista;

import sisvoto.modelo.Dignidad;

/**
 *
 * @author DJ2-PC
 */
public class NuevaDignidad extends javax.swing.JDialog {

    private Dignidad dignidad;
    /** Creates new form NuevaDignidad */
    public NuevaDignidad(java.awt.Frame parent, boolean modal) {
        super(parent, modal);
        this.dignidad=new Dignidad();
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {
        bindingGroup = new org.jdesktop.beansbinding.BindingGroup();

        imagePanel1 = new com.mycsistemas.swingec.panel.ImagePanel();
        curvesPanel1 = new com.mycsistemas.swingec.panel.CurvesPanel();
        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        jTextField1 = new javax.swing.JTextField();
        jButton1 = new javax.swing.JButton();
        jButton2 = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);

        imagePanel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/sisvoto/Recursos/''_10102012_1738.jpeg"))); // NOI18N
        imagePanel1.setLayout(null);

        curvesPanel1.setLayout(null);

        jLabel1.setFont(new java.awt.Font("Georgia", 3, 18));
        jLabel1.setForeground(new java.awt.Color(255, 255, 255));
        jLabel1.setText("Dignidad");
        curvesPanel1.add(jLabel1);
        jLabel1.setBounds(90, 20, 194, 21);

        jLabel2.setFont(new java.awt.Font("Elephant", 0, 14));
        jLabel2.setForeground(new java.awt.Color(255, 255, 255));
        jLabel2.setText("Nombre:");
        curvesPanel1.add(jLabel2);
        jLabel2.setBounds(22, 64, 61, 18);

        org.jdesktop.beansbinding.Binding binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, this, org.jdesktop.beansbinding.ELProperty.create("${dignidad.nombre}"), jTextField1, org.jdesktop.beansbinding.BeanProperty.create("text"));
        bindingGroup.addBinding(binding);

        curvesPanel1.add(jTextField1);
        jTextField1.setBounds(93, 64, 194, 20);

        jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/sisvoto/Recursos/tick_32.png"))); // NOI18N
        jButton1.setText("Acepatar");
        curvesPanel1.add(jButton1);
        jButton1.setBounds(49, 116, 121, 41);

        jButton2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/sisvoto/Recursos/DeleteRed.png"))); // NOI18N
        jButton2.setText("Cancelar");
        curvesPanel1.add(jButton2);
        jButton2.setBounds(180, 116, 120, 41);

        imagePanel1.add(curvesPanel1);
        curvesPanel1.setBounds(0, 0, 310, 170);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(imagePanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 312, javax.swing.GroupLayout.PREFERRED_SIZE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(imagePanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 175, javax.swing.GroupLayout.PREFERRED_SIZE)
        );

        bindingGroup.bind();

        pack();
    }// </editor-fold>//GEN-END:initComponents

    /**
     * @param args the command line arguments
     */
  

    public Dignidad getDignidad() {
        return dignidad;
    }

    public void setDignidad(Dignidad dignidad) {
        this.dignidad = dignidad;
    }
    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private com.mycsistemas.swingec.panel.CurvesPanel curvesPanel1;
    private com.mycsistemas.swingec.panel.ImagePanel imagePanel1;
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton2;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JTextField jTextField1;
    private org.jdesktop.beansbinding.BindingGroup bindingGroup;
    // End of variables declaration//GEN-END:variables
}
